import React, { Suspense } from "react";
import { BrowserRouter, useRoutes } from "react-router-dom";
import { routes } from "./routes";

const RouterView = () => useRoutes(routes);

class Router extends React.Component {
  render() {
    return (
      <BrowserRouter>
        <Suspense>
          <RouterView></RouterView>
        </Suspense>
      </BrowserRouter>
    );
  }
}

export default Router;
